-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
js/encoding: ModuleV2 migration #2241
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I still (as in the other PRs) am not certain if we:
- shouldn't stop exporting stuff that no longer need to be exported
- just return
map[string]interface{}
instead of creating a goja.Object that is basically that.
Not sure about exports but regarding this:
I think it's a matter of readability too: |
I agree with @yorugac here. I also think explicit is better than implicit on the front of types. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
This is true for the specific line, but I think that the map exported directly from the
Not visible from the fixup but from other PRs:
|
goja.Object can be anything ;) So the argument for me goes the other direction in two different ways:
Around #2258 we might decided to make this all more ... robust and with more specific types, maybe having something like nodejs' module.syncBuiltinESMExports(), but given that this PR just moves from the old |
For the sake of this discussion I just wanted to note the possibility of future renamings of those types but it seems @mstoykov already did that 🙂 I.e. there're pros and cons as mentioned and I also think this question should be revisited separately, like in #2258 as it simply has larger scope than this PR. |
efbf2fc
to
a08e1f4
Compare
Migrated
k6/encding
to themodules.Module
(akamodules.ModuleV2
) interface.